import request from "@/utils/request";

// 公告列表 rule/1
export const getRuleList = () => {
  return request({
    url: `/rule/1`,
    method: "get",
  });
};

// 修改状态 /rule/:id/update_status
export const changStatus = (id, data) => {
  return request({
    url: `/rule/${id}/update_status`,
    method: "POST",
    data,
  });
};

// 添加内容 /rule

export const addRule = (data) => {
  return request({
    url: `/rule`,
    method: "POST",
    data,
  });
};
// 修改内容
export const editRule = (id, data) => {
  return request({
    url: `/rule/${id}`,
    method: "POST",
    data,
  });
};
// 删除
export const delRule = (id) => {
  return request({
    url: `/rule/${id}/delete`,
    method: "POST",
  });
};